Skip to content

feat(pm): landing-k, pr-state and sweep-closed-cards --pr replace three retyped landing reads - #35576

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-w9aa30-b
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-w9aa30-b

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Part of #35237
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:产品用户看不到变化;车队席位落地前查"要不要先合主干"、报告前查合并请求的状态、合并后查有没有被误关的卡,这三件事从此各是一条命令。
  • 为什么做:这三步过去每次都由席位照着规则文字手工翻日志、数提交、逐张对卡,容易读错基点或漏看误关;交给脚本后规则只算一遍,规则文字一改,脚本自检就会报红。
  • 出错会怎样:三个脚本只读不写,出错最多是给席位一个错误的读数,落地前的其它关卡仍然把关;日志过期、读不全或合并后几分钟内,它们明说"答不了",不会给出看似干净的结果。
  • 要你做什么:无,席位按审核记录落地。

What changes

This is slice 2 of the card (landing reads): three readers replace three procedures that the landing and reporting rules spell as prose and that every landing seat retypes. Each prose line now names its reader and keeps its rule sentence.

  • scripts/pm/landing-k.mjs (new). Read-only, --pr N. It finds the PR's pull_request runs of ci.yml (filtered by the PR's own commit shas, because a branch name is reused across PRs: live, claude/project-thread-w9aa30 carries runs of two PRs), takes the newest completed run whose Test Core aggregate is success, reads one of its Test Core (k/N) shard logs (or the planner's, which prints the same line) and parses Affected-set diff base: SHA (why) as PRBASE. Diff base read from the selector step only: the line is taken from the job-log section that opens with the Run bash scripts/ci/select-shard-packages.sh step header; a log with no such step, no line in it, or more than one distinct base printed is exit 3. K = git rev-list --count --first-parent PRBASE..origin/main, after checking that the local origin/main is GitHub's main and that PRBASE is an ancestor of it. Then the two any-K legs as landing-operations.md states them: a new locale pack (a file added under a translations/ directory after PRBASE whose locale that directory did not hold at PRBASE) under a label PR (the PR file list read against the surface the two translation gates count: translation bundles, .form.ts modules, packages/spec/src, examples and the packages that own an i18n extract config, from the shared i18n-bundle-surface.mjs walk); and the two closed shared-budget books (input or ledger touched both by the PR and by main after PRBASE). Exits: 0 ok, 1 merge main first (each reason named), 2 usage, 3 can't answer. Fail closed: an expired or unreadable log, no green Test Core within the bound, a green run whose shards were all skipped (no line printed), a stale origin/main, a PRBASE the clone cannot count from, or a PR file list shorter than the PR's count are each exit 3 with the gap named; an unread PRBASE yields no K and no verdict. A leg that already says merge decides exit 1 and the unread legs are still printed.
  • scripts/pm/pr-state.mjs (new). Read-only, --pr N[,N…], one state line per PR: merged / draft / mergeable_state (an open PR's unknown is re-read up to --rereads times, default 3, 3 s apart; still unknown is INCOMPLETE, never printed as a reading) / queue (membership from the timeline's last added_to_merge_queue / removed_from_merge_queue; the position from the gh-readonly-queue refs, walked parent to tip from the base branch's current tip, read with git ls-remote; a queue ref that contradicts the last queue event, with no event or after a removal, is printed and is a gap) / reviews (newest per reviewer: the ones on the head, and apart from them the ones newest on an older commit, each with state and login, because an APPROVED counts on any commit; --json carries them as reviews_at_head and reviews_older) / checks at the head (every page of filter=latest check-runs, the count checked, judged with check-expected-skips.mjs's derived roster) / legacy commit status / auto_merge, tagged unreliable. Exits: 0 complete, 2 usage, 3 a PR row unreadable, 4 INCOMPLETE (a leg unread, mergeable_state still unknown, or a queue ref contradicting the timeline).
  • scripts/pm/sweep-closed-cards.mjs --pr N (new mode, report-only). For one merged PR: the closing-keyword targets in its body (the shared closingKeywordTargets parser) against the issues the merge closed. Population: the issues the search API lists as closed in [merged_at − 60 s, merged_at + 600 s] (count checked) plus every target. A close is tied to this merge when its closed event or a referenced event carries the merge commit, or when this PR cross-references it, no other PR whose body closes it merged in the window, and the close landed within 60 s of the merge. REST carries no closer field, so this tie is the reading. Live, on PR fix(core): drill a relationship path as one nested-relation condition, pushed down by the server #35423, the named target closed 4 s after the merge, and a folded card the seat closed by hand closed 112 s after it. A later close is listed as a hand close, with its actor. While the merge is younger than MERGE_SETTLE_SECONDS (300 s) the run is UNJUDGED, exit 2, and prints the time to re-run; the clean verdict is never printed inside that window. Exits: 0 every card closed by the merge is a named target · 4 (EXIT_SILENT_CLOSE) a silent close, each card named · 2 inside the settle window, an unreadable candidate or a short search · 3 the PR is not merged or unreadable · 1 usage. --write and --all-time beside --pr are refused. The closed-card sweep's own paths, options and exits are unchanged.
  • package.json: check:pm-expected-skips now also runs landing-k.mjs --self-test, pr-state.mjs --self-test and sweep-closed-cards.mjs --self-test. No new CI job: the existing "Expected-skips roster self-test" step in the always-on Lint · repo & tooling gates lane runs the chain, so all three drift pins (the K block, the per-look and status lines, and the silent-close line) go red on the PR that rewords them.
  • Prose, line counts unchanged, no ratchet ceiling touched (every touched line ≤ 120 bytes):
    • landing-operations.md (112 → 112): the K line keeps K's definition in words and names landing-k.mjs --pr N as the reading of K and of the two any-K legs below it. The shared-budget line drops the hand git diff spelling and keeps the rule. The silent-close line drops the hand inventory step, keeps the rule sentence and names sweep-closed-cards.mjs --pr N. The per-look line keeps "检查与 mergeable_state" and "unknown 重读" and names pr-state.mjs. Kept as written: the PRBASE line, the K ≥ 15 / behind / locale line, the two-book line and the label definition.
    • coordinator.md (51 → 51): the status line names pr-state.mjs and keeps the six facts.

Fix round 1 (contract review of e9f241b)

  • S1 · sweep-closed-cards --pr settle window. New constant MERGE_SETTLE_SECONDS = 300 (the 60 s auto-close bound plus four minutes for the search index). Younger merge ⇒ UNJUDGED, exit 2, the line names the re-run time (re-run at or after …). A silent close already readable inside the window is still the exit-4 alarm. Cases: ⭐ a merge younger than the settle window is UNJUDGED, exit 2, with the time to re-run — never the clean verdict, the window closes at the bound, a silent close already readable inside the window is still the alarm, exit 4, a merge time that does not parse leaves the window unread.
  • S2 · the line-77 pin runs where the other two run. sweep-closed-cards.mjs --self-test is in the check:pm-expected-skips chain; check-self-test-wired passes. The pin's readFileSync now sits in a try inside the case: a moved or split landing-operations.md fails that case with … could not be read (ENOENT) — moved or split? instead of throwing outside the harness.
  • S3 · pr-state older-commit reviews. Printed with state and login, apart from the at-head ones, in the line (newest on an older commit: APPROVED m@dddddddddd (an APPROVED counts on any commit)) and in --json (reviews_older). Cases: ⭐ approve, then a merge of main moves the head: the line still says who approved, never only a count, --json carries the older reviews apart from the at-head ones.
  • S4 · pr-state queue contradictions are gaps. Both queueLeg branches (no queue event with a ref present; a removal with a ref present) return a gap, so the run is INCOMPLETE, exit 4. One case each.
  • N1 · the silent close has its own exit code, EXIT_SILENT_CLOSE = 4, named in the header, the verdict line and a self-test case that pins it apart from 0, 1, 2 and 3.
  • N2 · battery floor = registered count for the --pr battery (19 = 19); the new and changed batteries in landing-k and pr-state are pinned at their registered counts too.
  • N7 · line 41 of landing-operations.md names landing-k as the reading of the any-K legs on lines 43–46 (112 lines before and after, 119 bytes).
  • Diff base read from the selector step only in landing-k (above). Cases: ⭐ the diff base is read from the selector step only: a line another step printed is not read, exit 3, ⭐ a log that prints two distinct diff bases is exit 3, neither read, the same base printed again outside the step still reads, from the selector step, ⭐ a log with no selector step is exit 3, its line unread, and the drift pin ⭐ ci.yml's planner and shard steps still open their run block with the selector.
  • N3–N6, N8, N9: accepted as recorded, unchanged.

Tests

  • node scripts/pm/landing-k.mjs --self-test: ✓ landing-k self-test: 47 cases pass across 7 batteries — offline, no network. Batteries are pinned by name with a floor, plus the handshake. They pin: PRBASE from the selector step of the shard log of the last green run on the PR's own commits (a newer green run on the same branch name but another PR's commit is never read; a red Test Core is skipped; the planner is read when no shard ran; a line from another step is not read; two distinct bases are exit 3); K at 14, 15 and 3; a stale origin/main, a non-ancestor PRBASE and a missing PRBASE each exit 3; the locale leg (new pack under a label PR merges at K = 3, the same pack under a non-label PR is clear, an already-held locale is no new pack); the budget leg (same book on both sides merges, two different books never meet); every unread leg exit 3. Drift pins: the K block's phrases in landing-operations.md, the line select-shard-packages.sh echoes, the selector as the first line of the planner's and the shards' run: blocks, both ledgers' existence and the three ci.yml job names.
  • node scripts/pm/pr-state.mjs --self-test: ✓ pr-state self-test: 36 cases pass across 6 batteries — offline, no network. They pin: unknown re-read until it settles and bounded, a merged PR never re-read; membership by the last queue event; position by the parent-tip chain; a ref that contradicts the timeline printed, not resolved, and INCOMPLETE; unlisted refs and an unreadable timeline are INCOMPLETE; reviews newest per reviewer at the head and, by state and login, on older commits; checks counted with expected and unexpected skips, every page, a count gap INCOMPLETE; the live roster derived from this checkout. Drift pins on coordinator.md, landing-operations.md and five readings-queue.md phrases.
  • node scripts/pm/sweep-closed-cards.mjs --self-test: ✓ sweep-closed-cards self-test: 106 cases pass across 10 batteries. 19 are in the --pr battery, pinned at 19 (the battery floor rose 9 → 10). No case of the existing sweep was removed or changed.

Acceptance notes

  • The settle bound is a choice, not a measurement. The platform's own close was measured at 4 s; the search index lag was not measured. 300 s is the 60 s auto-close bound plus four minutes; a seat that runs the reader right after a merge gets exit 2 and the re-run time, never a clean line.
  • Two gates caught real slips during this slice, and both were fixed in it. check-closing-keyword-parity flagged a cross-repo closing-keyword regex in sweep-closed-cards.mjs as a fourth parser. It was removed, and the mode now reads targets only through the shared parser (other repositories' cards are named as unread). check:pm-dispatch-gates flagged a bare examples/ literal in landing-k.mjs as a new escapable-literal row. It is now a pattern (remedy (b): the reader predicates over PR paths and walks no root).
  • The label PR is a surface proxy. Whether a diff really changes a display label is answered only by running the two translation gates. The reader reads the PR's files against the surface those gates count, and a hit reads as a label PR, so the leg errs toward merging first. The footer says so on every run.
  • A green Test Core with no shard printed no diff base. That run is exit 3, not a fallback to an older run or to the PR's merge-base: the rule names the last green run's line.
  • Remaining slices of the card (separate PRs, Part of): the round health line; in-flight status and round-open; the deferred area-lease.md and dispatch-runbook.md pointers; l1-face; the os-dev pointers.

Verification

Live runs at head 2aa7331 (fix round 1), read-only

node scripts/pm/landing-k.mjs --pr 35576 → exit 0 (the diff base read from the selector step of a real shard log):

landing-k — objectstack-ai/objectstack #35576 · open · head 2aa7331393 · claude/project-thread-w9aa30-b
PRBASE 83a79e6f73 (merge-base of origin/main and HEAD) — from `Test Core (2/10)` of run 44570121780, the last green Test Core (run head 2aa7331393, the PR head)
K = 3 first-parent commit(s) on origin/main (e35cf03556) since PRBASE · hold at 15 → ok · `behind` alone is no reason
locale leg — new locale pack(s) after PRBASE: none · label PR: no file on the label surface
shared-budget leg — main after PRBASE touches: no book · this PR touches: no book
Not read by this reader — the seat reads these itself: (four legs, trimmed)
landing-k OK — K = 3 (below the hold of 15), no new locale pack under a label PR, no shared book moved under this PR's.

(The verdict line is quoted with its less-than sign spelled out.)

node scripts/pm/pr-state.mjs --pr 35576,35482 → exit 0:

#35576 · OPEN · draft yes · mergeable_state clean · queue: never queued (no queue event) · reviews at 2aa7331393: none · checks at 2aa7331393: 51 success · 10 expected skip · 0 unexpected skip · 0 failed · 0 pending · no commit status · auto_merge null [unreliable field]
#35482 · MERGED 2026-11-19T13:48:50Z · draft no · mergeable_state n/a (merged) · queue: landed · reviews at 1b3817ad2b: none · checks at 1b3817ad2b: 52 success · 15 expected skip · 0 unexpected skip · 0 failed · 0 pending · no commit status · auto_merge null [unreliable field]
Not read by this reader — the seat reads these itself: (four legs, trimmed)
pr-state COMPLETE — 2 PR(s), every leg read.

node scripts/pm/sweep-closed-cards.mjs --pr 35423 → exit 0 (the merge is hours old, outside the settle window):

sweep-closed-cards --pr 35423 — merged 2026-11-19T14:56:27Z as eed422ea24 · REPORT ONLY, nothing written
closing-keyword targets in the body (this repository): #34990
closed by this merge:
  · #34990 named · closed 2026-11-19T14:56:31Z (4s after the merge) by objectstack-fleet[bot] · this PR references it and no other closing PR merged in the window
  · #35447 not named, referenced by this PR, closed by objectstack-fleet[bot] — closed 112s after the merge — later than the platform closes on a merge (60s); a hand close, read its close-out
Not read by this mode: a card in another repository a cross-repo keyword closed.
✓ every card closed by this merge is a named target. Exit 0.

#35447 was a folded card the seat closed by hand with a close-out comment. The first build of this mode read it as a silent close. That reading is why the 60 s bound exists.

Live runs at head e9f241b (before fix round 1)

node scripts/pm/landing-k.mjs --pr 35482 → exit 1: PRBASE 895dd437f4 (merge-base of origin/main and HEAD) — from Test Core (2/10) of run 44529574837, K = 20 … → merge main first, landing-k MERGE MAIN FIRST — K = 20 ≥ 15.

node scripts/pm/sweep-closed-cards.mjs --pr 35482 → exit 0: its body carries Part of, no closing keyword, and no card closed with it.

Gates (local, head 2aa7331) and exits
  • The three self-tests, each exit 0: 47 / 36 / 106 cases.
  • pnpm check:pm-expected-skips exit 0 (the chain now runs four self-tests); node scripts/check-self-test-wired.mjs exit 0; node scripts/pm/check-skill-line-ratchet.mjs exit 0; pnpm check:pm-governed-prose exit 0; pnpm check:pm-prior-rulings exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands exit 0, 52 families derived. Ran 52: 47 exit 0. 5 exit 3 PREREQUISITE NOT MET, read as NOT MEASURED because they need a built dist/ and this diff touches no workspace package: check:doc-formula-expressions, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. CI runs them on a built tree. dispatch-gates --ran: 52 derived, 47 run, 5 NOT-MEASURED, 0 UNRUN, exit 0. check:pm-dispatch-gates: ✓ dispatch-gates self-test (fast tier): 2249 cases pass.
  • node scripts/pm/overlap-check.mjs → VERDICT clean exit 0 (origin/main 83a79e6 merges cleanly; 0 open PR heads share a file).
  • eslint --no-inline-config on the three scripts: exit 0.
Ablations, fix round 1 (scripts/ablation-replace.mjs: the mutation proven on disk, restored to the HEAD blob)

Each leg: anchor hit once, blob changed, the self-test exit 1 with the named case red, then ok restored: blob == HEAD … and git diff HEAD is empty.

  • S1: the settle comparison (now before merge time plus MERGE_SETTLE_SECONDS) replaced by false in judgeMergeCloses → 1 of 106 case(s) failed: ✗ ⭐ a merge younger than the settle window is UNJUDGED … — ✓ every card closed by this merge is a named target. Exit 0. Restored to blob 42474e895358.
  • S2: LANDING_OPERATIONS_PATH pointed at a missing file → 1 of 106 case(s) failed: ✗ ⭐ landing-operations.md still says the rule this mode reads … — … could not be read (ENOENT) — moved or split?; the harness reports it, nothing throws.
  • N1: EXIT_SILENT_CLOSE = 4 set to 1 → ✗ the silent close has its own exit code, apart from usage, unjudged and the unmet prerequisite.
  • S3: the older-review text put back to the bare count → 2 of 36 case(s) failed, including ✗ ⭐ approve, then a merge of main moves the head: the line still says who approved, never only a count — got [0,false], want [0,true]. Restored to blob c223d9d860c2.
  • S4, no-event branch: its gap deleted → ✗ ⭐ a ref with no queue event on the timeline contradicts it: INCOMPLETE exit 4 — got [0,true,[]].
  • S4, removal branch: its gap deleted → ✗ ⭐ a ref after the last event removed the PR contradicts the timeline … INCOMPLETE exit 4 — got [0,true,false], want [4,true,true].
  • Selector step: the step scope removed (every line read) → ✗ ⭐ the diff base is read from the selector step only: a line another step printed is not read, exit 3 — got [0,{…}]. Restored to blob 586699eb600f.
  • Selector step: the distinct-base refusal disabled → ✗ ⭐ a log that prints two distinct diff bases is exit 3, neither read — got [0,{…}].

The first S4 attempt used a replacement ( }) that already occurred 207 times in the file; the tool refused it (a rise of 0, not the declared 1), restored the blob and ran nothing. Both legs were re-run as deletions, above.

skip-changeset: scripts/pm/**, .claude/** and the root package.json script line publish nothing.


Generated by Claude Code

@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 19, 2026
@github-actions github-actions Bot added size/xl dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CaAqjP52wVTzs99H5G

L1: ACCEPT · area fleet-1 · 2026-11-19T16:04Z · head e9f241b6f5

  • Scope: slice 2 of pm scripts: turn retyped prose procedures into scripts, including a card-pick reader by epic and area (step 6) #35237 (Part of), the landing reads. Two new read-only readers, landing-k.mjs --pr N and pr-state.mjs --pr N[,N], plus a report-only sweep-closed-cards.mjs --pr N mode. The sweep's existing behaviour is untouched, and --write/--all-time are refused beside --pr. Five lines in landing-operations.md and coordinator.md now name their reader and keep the rule sentence, as slice 1's S5 asked. Line counts are unchanged and no ceiling was touched.
  • Fails closed: landing-k returns exit 3 with the gap named in each of these cases: an expired or unreadable log, no green Test Core run, all shards skipped, a stale local origin/main, a PRBASE that is not an ancestor, or a short file list. It never reads an unread log as K = 0. pr-state re-reads unknown a bounded number of times and otherwise ends INCOMPLETE (exit 4).
  • Self-tests: landing-k 42, pr-state 33, sweep 101 (14 new, battery floor 9→10, no existing case changed). Drift pins cover the rule phrases each reader replaces. One ablation per reader went red: 12/42, 3/33 and 2/101, each file restored to HEAD.
  • Live runs: landing-k --pr 35482 → K 20, merge main first, with PRBASE read from a Test Core shard. pr-state --pr 35482,35532 → complete. sweep --pr 35423 → the named card closed by the merge, the folded card listed as a hand close. That last case is why the 60 s bound exists.
  • Gates: 52 dispatch-gates families ran: 47 exit 0, and 5 are not measured because they need dist. The order's named gates, check-closing-keyword-parity and check:pm-expected-skips, all exit 0. Overlap-check is clean.
  • For L2, one call: in sweep-closed-cards --pr, a silent close shares exit 1 with the file's existing usage code. The verdict line says which one happened. The dev kept both so the existing sweep's contract doesn't change.
  • CI on this head: still running when this record was written.

Next: seat L2 at contract tier. Governed Tier S (.claude/**), so the owning seat lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: e9f241b6f52eafcd5fe2ea5d4ddedb37dbcf623a
Local-runs: none
Scope: .claude/skills/pm-dispatch/references/coordinator.md, .claude/skills/pm-dispatch/references/landing-operations.md + scripts/pm/landing-k.mjs, scripts/pm/pr-state.mjs, scripts/pm/sweep-closed-cards.mjs, package.json

Read for this record: card #35237 (body, all seven comments, its timeline), PR #35576 (body, file list, its one comment), the net diff against main (de395b428d, merge base b65488a8a9), and the 66 check-runs on the head: 52 success, 14 skipped, none failed or pending; all eleven required contexts are success. The six files in scope are the whole diff, so no remainder is left for a lane ACCEPT.

① Derived judgments

  • No published surface moves — right. The diff is scripts/pm/**, two .claude/** reference files and one script line of the private root package.json.
  • Two new CLIs — right. landing-k.mjs --pr N (exits 0 ok, 1 merge main first, 2 usage, 3 can't answer) and pr-state.mjs --pr N[,N] (exits 0, 2, 3, 4). Both refuse an unknown argument.
  • sweep-closed-cards.mjs accepts --pr N in two spellings — right, with S1 and N1. --write and --all-time beside it are refused. The mode returns before the sweep's write path (main, the options.pr branch), so the existing sweep's arguments, exits and writes are unchanged.
  • check:pm-expected-skips now also runs the landing-k and pr-state self-tests — right. The step runs in lint.yml's Lint · repo & tooling gates lane, which has no paths filter and sits behind the required Lint & Repo Gates. So a PR that rewords the K block, line 81 of landing-operations.md, lines 50–51 of coordinator.md, the five pinned readings-queue.md phrases, the ci.yml job names or the selector's echo line goes red on its own run. That is the intended drift pin.
  • The third pin does not have that property — wrong, S2. The phrase pin for line 77 lives in the sweep-closed-cards self-test, which no blocking lane runs.
  • Skill line ratchet — untouched. landing-operations.md stays 112 lines (10,711 → 10,706 bytes) and coordinator.md stays 51 (3,785 → 3,781). The five touched lines are 108, 93, 119, 118 and 114 bytes. No ceiling file is in the diff.
  • Governed tier — right. .claude/** is Tier S; the diff is 1,551 changed lines, under the 3,000 line class; the PR is a same-repo draft.
  • Reads only — right. landing-k reads through the shared ghApi, one more gh api PATH spawn for the job log (argv only, no field flags, so a GET), and local git read verbs (rev-parse, cat-file, merge-base --is-ancestor, rev-list, diff, ls-tree). It never fetches: a stale origin/main is exit 3 with the fetch named. pr-state reads through ghApi and one git ls-remote, the zero-quota read readings-queue.md lines 64–67 name. sweep --pr calls the file's rest() four ways, all with the default GET. No file in the diff adds a write verb, and none of the three opens the relay.

② Semver level

skip-changeset is correct: nothing in the diff ships from a released package. Clause-②: no and Metadata-protocol: none on the PR body both hold: no contract surface and nothing a metadata author can write is touched.

③ Boundary flags

  • Dev deviation 1 (exit 1 shared with usage) — answered in ④ under N1.
  • Dev deviation 2 (维护者速读 in four lines, "os-dev.md names six") — no conflict in the tree. .claude/agents/os-dev.md line 284 reads 「至多四行」 on this head and on main. Four lines is the rule.
  • Dev deviation 3 (two gates caught slips) — the tree agrees. sweep --pr reads targets only through closingKeywordTargets, and landing-k spells the examples surface as a pattern.
  • Dev deviation 4 (the label PR is a surface proxy) — accepted. The surface is the one the two named gates count (pnpm check:i18n and pnpm check:i18n-coverage, the steps lint.yml ids check-generated-translation-bundles and check-no-new-untranslated-declared-labels). A hit over-reads toward merging first, and the footer names the real question as unread on every run.
  • open_questions — empty.
  • Slice plan — the PR is slice 2 as claimed. The claim amendment (comment 7013022048) names six files and the diff is exactly those six. Part of #35237 is right: slice 1's report lists the later slices and they are still open.
  • One note for the card's close-out, not a finding here. The card's Done-when says "the prose is a one-line pointer". This slice removes no line: the six K-block lines stay and landing-k pins four of them. That follows the reading slice 1's review set (the rule sentence stays, the retyped procedure goes). The seat should either amend the Done-when or say on the card that it is met in this form before the card closes.
  • SQL push-down — not applicable. The diff has no query, id materialisation or join; its reads are REST and git.

④ Design judgment

coordinator.md (line 50) — holds, with S3. The line keeps the six facts and the same-round obligation and names the reader; line 51 is unchanged. No rule is restated: the six facts were on this line before.

landing-operations.md (lines 41, 44, 77, 81) — holds, with S1, S2 and N7. Each line keeps its rule sentence. Line 41 keeps K's definition in words. Line 44 keeps the shared-budget rule. Line 77 keeps the definition of a silent close, and line 76 above it still orders the lane inventory after every merge, so dropping the hand step from line 77 removes no obligation. Line 81 keeps "检查与 mergeable_state" and "unknown 重读". No new line states a rule that lives in another reference.

landing-k.mjs — agrees with lines 41–46. PRBASE is the diff base the last green PR run's Test Core printed, read from runs on the PR's own commits, never from a start time. K is the first-parent count, taken only after the local main is checked against GitHub's and PRBASE is checked as its ancestor. The hold is at 15. Both any-K legs follow the rule text, and the two books are the two the rule names. Every unread leg is exit 3. I tried a red newer run, a run still in progress, a reused branch name, a re-run attempt and a head that moved after the last green run: each either answers from an older base (a larger K, so it errs toward merging first) or exits 3.

pr-state.mjs — agrees with the readings it cites, with S3 and S4. Membership comes from the last queue event, position from the parent-tip chain rooted at the remote's current base tip, unknown is re-read a bounded number of times and then INCOMPLETE, the legacy status is read apart from check-runs, and auto_merge is tagged unreliable.

sweep-closed-cards.mjs --pr — report-only as claimed, with S1, S2 and N1.

package.json — the chain is right for two of the three readers (S2).

S1 (should-fix) — sweep-closed-cards --pr prints the clean verdict on a merge whose close window is still open. An unnamed card reaches the candidate set only through the search API (readMergeCloses, line 666); the targets are added directly, but they are the cards that cannot be silent closes. The mode takes no clock reading, so a run a few seconds after the merge, which is when line 77 sends the seat, prints ✓ every card closed by this merge is a named target. Exit 0. whether or not the platform's close has landed and the search index has caught up. The file's own docblock measures the platform close at 4 s and names the index lag, but the lag is named in a footer that prints on every run, so it carries no signal on the run where it applies. The hand step this line replaced read the open-card list and had no such window. Asked: while the merge is younger than a bound the file names, answer UNJUDGED (exit 2) with the time to re-run; or draw the unnamed candidates from a read that needs no index.

S2 (should-fix) — The drift pin for line 77 sits in the one self-test no blocking lane runs, and its failure switches off the label sweep. sweep-closed-cards.mjs --self-test runs only in half-state-patrol.yml (line 370). That workflow's PR trigger lists four scripts and its own files, not .claude/skills/**, so a later PR that rewords line 77 never runs the pin. And the step answers a failed self-test with an error annotation, skips the sweep and exits 0 (lines 374–385). So after such a reword the PR is green, and every later patrol run skips the closed-card label sweep on a green job. If landing-operations.md is moved or split, the readFileSync in the case's argument (line 1273) throws outside the harness, with the same result. Asked: run this pin where the always-on lane runs the other two, for example by adding the sweep's self-test to the check:pm-expected-skips chain.

S3 (should-fix) — pr-state prints the state and login only for reviews on the head commit; every other reviewer is one count, (N reviewer(s) newest on an older commit) (reviewsAtHead, line 116; the JSON carries the same count). On this repository an authorized APPROVED review counts on any commit (AGENTS.md, Prime Directive 14), and the ordinary Tier H sequence is approve, then merge main, which moves the head. After that the line reads reviews at HEAD: none (1 reviewer(s) newest on an older commit). A coordinator following line 50 cannot tell the maintainer whether that reviewer approved, so it either reports no approval or re-reads the reviews by hand, which is the read this reader replaces. Asked: print state and login for the older reviews too, apart from the at-head ones.

S4 (should-fix) — pr-state exits 0 and prints pr-state COMPLETE — … every leg read. on a line that itself says re-read. Two branches of queueLeg (lines 154–155) print a queue ref that contradicts the timeline and return no gap: no queue event with a ref present, and a removal with a ref present. The first is the case readings-queue.md line 8 calls a non-reading (the enqueue event measured absent for 75 s). The header's exit register says 4 is for a line that must never be read as clean, and unknown is treated that way. Asked: make a contradiction a gap, so the run is INCOMPLETE.

N1 (nit) — Exit 1 for a silent close is also this file's usage code, and Node's code for an uncaught throw. By the exit code alone a caller cannot tell the three apart. By the output it can: the verdict line names the cards, a usage error names the argument on stderr, and --json prints a document only for a verdict. All three confusions are on the alarm side, none reads as clean, and no action can follow from the code alone because the card numbers are only in the output. So no wrong landing follows, and the header says the code is shared. Two things remain. The code cannot be branched on by a script or a CI step. And line 589 spells the silent close as EXIT_USAGE, with the self-test asserting against the same constant, so renumbering usage later would move the silent-close code with no case going red. Codes 4 and up are free in this file, so a code of its own for the new verdict would not touch the existing sweep. Accepted deviation, or its own named constant in the fix round.

N2 (nit) — The new sweep battery is pinned at 13 and registers 14 cases, so one case, the phrase pin for instance, can stop registering with the floor still green.

N3 (nit) — In landing-k's ci.yml pin (line 578), name: Test Core is a substring of the shard job's name: line, so the aggregate's pin cannot fail while the shard's name stands.

N4 (nit) — --pr accepts --since-hours, --max-cards, --list-cap, --provenance and --dry-run and ignores them; the file's own rule is that an argument that changes nothing is refused.

N5 (nit) — landing-k reads main's side with git diff --name-only, which follows renames and lists only the destination, while the PR side adds previous_filename (line 319). A file renamed out of skills/** on main is not seen as touching the book. --no-renames closes it.

N6 (nit) — When the PR row cannot be read, --pr prints the board sweep's refusal ("NOTHING WAS SWEPT … residue"), which describes a different read.

N7 (nit, prose) — Line 41 names landing-k as the reading of K only. Lines 43–46 state the two any-K legs, and line 44 lost its git diff spelling, so nothing on those lines says the same command answers them.

N8 (nit) — The referenced leg of mergeCloseTie (line 549) has no 60 s bound, and its case calls the event "a keyword in the squashed commit message", though any mention raises it. The leg is quiet on this board today: the card's own timeline carries no referenced event for the squash merge of #35482, whose message says Part of #35237.

N9 (nit) — On an OPEN PR, queue: not in queue (removed T) does not say that a removal a few seconds old is also what a landing looks like (readings-queue.md lines 12–13).

Implemented-by: claude/project-thread-w9aa30-b
Reviewed-by: isolated-l2-35576

VERDICT: PASS

…in, older reviews, queue contradictions

- sweep-closed-cards --pr: a merge younger than MERGE_SETTLE_SECONDS (300 s) is
  UNJUDGED (exit 2) with the time to re-run, never the clean verdict; the silent
  close gets its own exit code, EXIT_SILENT_CLOSE = 4; the --pr battery floor
  matches its registered count; the line-77 phrase pin reads its file inside
  the harness, so a moved or split file fails the case instead of throwing.
- check:pm-expected-skips now also runs sweep-closed-cards --self-test.
- pr-state: reviewers whose newest review is on an older commit are printed
  with state and login, apart from the at-head ones, in the line and --json;
  a queue ref that contradicts the timeline's last queue event is a gap, so
  the run is INCOMPLETE (exit 4).
- landing-k: diff base read from the selector step only.
- landing-operations.md line 41 names landing-k as the reading of the any-K
  legs too (line count unchanged).

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CaAqjP52wVTzs99H5G

L1 delta after L2: ACCEPT · area fleet-1 · 2026-11-19T17:12Z · head 2aa7331393 (from e9f241b6f5, one fast-forward commit)

  • S1. sweep-closed-cards --pr reads a clock now. While the merge is younger than MERGE_SETTLE_SECONDS (300 s), the run is UNJUDGED, exit 2, and names the re-run time. A merge time that does not parse is UNJUDGED too. A silent close already readable inside the window is still the alarm. The existing --pr cases pass an explicit nowMs, so none depends on the wall clock. Ablation (settle test → false): the young-merge case goes red, and it printed the clean line.
  • S2. check:pm-expected-skips now ends with sweep-closed-cards.mjs --self-test, so the line-77 pin runs in the always-on lane beside the other two. The pin's file read sits inside the case: a moved file fails the case (ENOENT named) instead of throwing. Ablation on the path: 1 case red, no throw.
  • S3. pr-state prints the reviewers whose newest review is on an older commit by state and login, apart from the at-head ones, in the line and in --json (reviews_older). The ⭐ case covers approve-then-merge-main.
  • S4. Both queueLeg contradiction branches return a gap, so the run is INCOMPLETE, exit 4. There is one case each, and deleting either gap turns its case red.
  • N1. The silent close has its own exit, EXIT_SILENT_CLOSE = 4, pinned apart from 0/1/2/3. The header's exit list is rewritten. N2. The --pr battery is pinned at 19 = 19 registered. N7. Line 41 names landing-k as the reading of the any-K legs (119 bytes, 112 lines before and after, no ceiling edit).
  • Diff base read from the selector step only. landing-k takes the line only from the selector step's log section. A log with no selector step, no line in it, or two distinct bases is exit 3. A drift pin checks that ci.yml's planner and shard steps still open their run: block with the selector. Live: landing-k --pr 35576 read PRBASE from a real Test Core (2/10) log, K = 3.
  • Accepted as recorded: N3–N6, N8, N9.
  • Gates. Self-tests pass: landing-k 47, pr-state 36, sweep-closed-cards 106. check:pm-expected-skips, check-self-test-wired, the skill line ratchet, check:pm-governed-prose and check:pm-prior-rulings all exit 0. dispatch-gates: 52 derived, 47 run, 5 not measured (they need dist). Overlap is clean. Main was not merged (no conflict).
  • Records. The PR body is refreshed through the relay and reads back identical. It has a Fix round 1 list, new counts and exits, and the settle bound noted as a choice.
  • CI. At this head: 51 success, 10 skipped, 0 failed or pending.

Next: the seat's L2 delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2aa7331393357f6700acd3d869abdf34ca71e6ce
Local-runs: none
Scope: .claude/skills/pm-dispatch/references/coordinator.md, .claude/skills/pm-dispatch/references/landing-operations.md + scripts/pm/landing-k.mjs, scripts/pm/pr-state.mjs, scripts/pm/sweep-closed-cards.mjs, package.json

Delta review of fix round 1, against the record on e9f241b6f5 (comment 7015548169). Read for this record: the diff e9f241b6f5..2aa7331393 (one commit, whose parent is the reviewed head; main was not merged), the PR body and file list, the L1 delta comment 7016394013, the card's comments, and the 65 check-runs on this head: 52 success, 13 skipped, none failed or pending; all eleven required contexts are success. One Test Core shard log of this head was read over REST to check the log shape landing-k now keys on.

S1: closed
S2: closed
S3: closed
S4: closed
N1: closed
N2: closed
N7: closed

No must-fix, no should-fix.

① Derived judgments

  • Nothing else moved — right. The commit touches five files: one line of landing-operations.md, one script line of package.json, and the three readers. coordinator.md and every workflow file are byte-identical to the reviewed head. The net diff against main is still the same six files.
  • sweep-closed-cards --pr exit register changes: 4 is the silent close, 1 is usage only — right. The code is new in this PR, so no caller is moved. The existing sweep's exits 0, 1, 2 and 3 are unchanged.
  • sweep-closed-cards --pr answers UNJUDGED (exit 2) on a merge younger than 300 s — right. It narrows what can print the clean verdict.
  • pr-state exit 4 now also covers a queue ref that contradicts the timeline — right. --json gains reviews_older and reviews_at_head loses its older count; the reader is new in this PR, so no consumer is moved.
  • landing-k reads the diff base from the selector step's log section only, and exits 3 on a log with no such step, no line in it, or two distinct bases — right. It narrows the read and every new refusal is fail-closed. A new pin holds ci.yml's planner and shard steps to opening their run block with the selector.
  • check:pm-expected-skips now runs the sweep's self-test too — right. See S2 below.
  • Skill line ratchet — untouched. landing-operations.md stays 112 lines; line 41 is 119 bytes. No ceiling file is in the diff.

② Semver level

Unchanged from the first record: skip-changeset is correct, and Clause-②: no and Metadata-protocol: none hold. The fix round adds nothing that ships.

③ Boundary flags

  • The settle bound is a choice, not a measurement (PR body) — accepted. The platform's close is measured; the index lag is not. The bound errs toward UNJUDGED, and the header names the constant and what it is made of.
  • No fix-round os-dev-report is on the card at this read. The newest card comment is still the slice 2 report on e9f241b6f5. The L1 delta comment and the refreshed PR body carry the account of the round. The seat should confirm that is the intended record for a fix round.
  • open_questions — none raised in this round.
  • The note on the card's Done-when from the first record stands, for the card's close-out.
  • SQL push-down — not applicable, as before.

④ Design judgment

S1. judgeMergeCloses takes a clock (nowMs, defaulting to the wall clock at the one call site in main). While the merge is younger than MERGE_SETTLE_SECONDS it adds an unjudged row with the time to re-run, and renderMergeCloses prints the UNJUDGED verdict; the clean line cannot print in that window. A merge time that does not parse is UNJUDGED too. A silent close already readable inside the window still raises the alarm. The earlier cases now pass an explicit clock, so none depends on when CI runs.

S2. sweep-closed-cards.mjs --self-test is the last link of the check:pm-expected-skips chain. That step runs in Lint · repo & tooling gates, which has no paths filter, reads every step's outcome and sits behind the required Lint & Repo Gates. A PR that rewords line 77 now goes red on its own run. The pin's file read sits inside the case, so a moved or split file fails that case by name. The patrol workflow's own handling of a failed self-test is unchanged, but the pin can no longer reach it unseen.

S3. reviewsAtHead returns the older-commit reviews with login, state and commit, and the line and --json print them apart from the at-head ones. The approve-then-merge-main sequence has its own case.

S4. Both contradiction branches of queueLeg return a gap, so the run is INCOMPLETE (exit 4) and the COMPLETE line cannot print over a re-read. One case each, and the header's exit register says so.

N1. EXIT_SILENT_CLOSE = 4 has its own constant, the verdict line prints it, the header's exit list is rewritten, and a case pins it apart from 0, 1, 2 and 3.

N2. The --pr battery is pinned at 19 and registers 19. The changed batteries in landing-k (47 cases) and pr-state (36) are pinned at their registered counts.

N7. Line 41 now reads 「挂 auto-merge/入队前读 K(PRBASE 至 origin/main 首父提交数)与任何 K 两腿,读 landing-k.mjs --pr N。」 It keeps K's definition in words and names the reader for the two legs that lines 43–46 state. It restates no rule: the legs are still defined only on their own lines.

landing-k.mjs, the selector-step read. It agrees with line 42: PRBASE is still the line the last green run's Test Core printed, now taken from the step that prints it. On the shard log I read for this head, the step header is Run bash scripts/ci/select-shard-packages.sh, the one diff-base line sits inside that step's section, and the log carries one distinct base, so the reader's three refusals are not tripped by an ordinary log.

N10 (nit) — The pr-state line now ends its older-review list with (an APPROVED counts on any commit). That is a rule sentence in a reader's output, and it is wider than the rules it points at: Prime Directive 14 says an authorized APPROVED that is not dismissed, and landing-operations.md line 35 asks for the approval at the current head for a PR over 3,000 lines. The state, login and commit on the line are right, and the landing itself is decided by check-governed-merges.mjs and the relay, so nothing wrong lands. Accepted deviation, or a follow-up that drops the gloss.

N3, N4, N5, N6, N8 and N9 from the first record are unchanged in the tree; the L1 delta comment accepts them as recorded.

Implemented-by: claude/project-thread-w9aa30-b
Reviewed-by: isolated-l2-35576-d1

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

维护者速读

席位核对 — ACCEPT · repo:objectstack#5 · head 2aa7331393357f6700acd3d869abdf34ca71e6ce · 2026-11-19T17:19Z

  • Shape: 6 files: scripts/pm/landing-k.mjs and scripts/pm/pr-state.mjs (new), sweep-closed-cards.mjs --pr, pointer lines in coordinator.md and landing-operations.md, one package.json script. Part of #35237, Clause-②: no, skip-changeset. L1 ACCEPT 7014600042, delta 7016394013 (fleet-1).
  • Contract review: PASS with S1–S4 7015548169 → delta d1 PASS 7016537388 at this head. S1–S4, N1, N2, N7 closed; N3–N6, N8–N10 accepted deviations. Security-touching: addressed in the head; nothing further owed on this PR.
  • Gates: every check-run on this head success or skipped, none failing; all required contexts success.
  • Accepted deviation: no fix-round os-dev-report on pm scripts: turn retyped prose procedures into scripts, including a card-pick reader by epic and area (step 6) #35237; the L1 delta and the refreshed PR body carry the round's account.
  • Landing clause: governed .claude/**, Tier S, the owning seat lands. K = 11 first-parent commits on main since merge base b65488a8a9 (< 15). Label security.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

落地 — repo:objectstack#5 · head 2aa7331393357f6700acd3d869abdf34ca71e6ce · 2026-11-19T17:19Z

probe reading
checks every check-run on 2aa73313 success or skipped, none failing (the head contract-review delta d1 pins)
K 11 first-parent commits on main since merge base b65488a8a9 (< 15)

Governed .claude/**, Tier S, owning seat lands: security label, pr_ready + automerge_enable in this stroke. On MERGED, #35237 stays open; fleet-1 releases the remaining slices to seat 1 and clocks out.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 17:20
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 08d920a Nov 19, 2026
71 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-w9aa30-b branch November 19, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation security size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants